From: Eli Zaretskii Date: Sat, 7 Dec 2013 14:59:37 +0000 (+0200) Subject: Fixed $HOME in expand-file-name. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~2035^2~18 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=857fd372ee7908cca436e7662f1462815b6ad099;p=emacs.git Fixed $HOME in expand-file-name. --- diff --git a/src/fileio.c b/src/fileio.c index 476d77f8244..e5347ce765a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1164,7 +1164,18 @@ filesystem tree, not (expand-file-name ".." dirname). */) nm++; /* `egetenv' may return a unibyte string, which will bite us since we expect the directory to be multibyte. */ - tem = build_string (newdir); +#ifdef WINDOWSNT + if (newdir[0]) + { + char newdir_utf8[MAX_UTF8_PATH]; + + filename_from_ansi (newdir, newdir_utf8); + tem = build_string (newdir_utf8); + } + else +#else + tem = build_string (newdir); +#endif if (multibyte && !STRING_MULTIBYTE (tem)) { hdir = DECODE_FILE (tem);